The present invention relates generally to multimedia files and more specifically to multimedia containers and systems for encoding and decoding multimedia containers.
A multimedia engagement typically entails the decoding and presentation of audio, video, and subtitle information in a synchronized manner. In general, each one of the individual parts making up the presentation is previously encoded as a separate elementary stream and is then multiplexed together in an encapsulating container. The Audio-Video-Interleave (AVI) container specified by Microsoft Corporation of Redmond, Wash. is one such encapsulation format, and is also one of the most prevalent forms of distributing standard-definition downloadable content on the Internet and peer-to-peer networks. The Matroska (MKV) container specified by a group of Open-source Enthusiasts and published by Core Codec is another such encapsulation format, and is also one of the most prevalent forms of distributing high-definition downloadable content on the Internet and peer-to-peer networks.
At its most basic level, the AVI container is made up of chunks and lists, each of which start with a four-character code (32-bit) identifier followed by a size indicator (32-bit) for that particular section. AVI lists generally contain information about the file and encapsulate other chunks, where the chunks are typically used to encapsulate the elementary audio, video, and subtitle data streams. A typical AVI chunk is illustrated in FIG. 1. The AVI chunk 10 includes a four-character code identifier 12, a size indicator 14 and chunk data. The character code identifier can be expressed in the form nnxx, where nn is a stream number and xx is the stream designator.
The AVI container specification includes two mandatory lists, which define the format of the streams and the stream data, respectively. AVI containers can also include an index chunk, which gives the location of data chunks within an AVI container. An AVI container with these components has the following form:
RIFF('AVI'LIST('hdrl' ...)LIST('movi' ...)['idx1' (<AVI Index>)])
A decoder typically decodes multimedia information contained within an AVI container by parsing the ‘hdrl’ list to obtain information about the elementary streams contained within the AVI container. Once the ‘hrdl’ list has been parsed, the multimedia information can be rendered from the start of the ‘movi’ list. The ‘idx1’ chunk can be used to perform, so called “trick play”, functions such as seeking, rewinding or fast forwarding. Information contained within the ‘idx1’ chunk can be used by a player to locate chunks containing multimedia information sought by a trick play function.
At its most basic level, the MKV container is made up of elements, with most elements able to nest some other elements. FIG. 1B illustrates such a typical MKV container. The element type is defined by a variable-length integer identifier and the element's size by a variable-length integer size field, followed by the corresponding data bytes whose length is determined by the size field. The container has standard element types that can be used to carry a variety of payloads, such as headers 17, bit streams 18, different types of indexes (e.g., segment and track indexes 13, 15) and auxiliary data 19.